<?php
	if (!headers_sent())
	{
		header("Content-type: application/x-javascript");
	}
	
	require_once dirname(dirname(__FILE__)) . "/config/cConfig.php";
	require_once dirname(dirname(__FILE__)) . "/config/cServers.php";
	
	$webConfig = new \ampleharvest\cConfig();
	
	require_once $webConfig->C_STR_AMPLEHARVEST_CODE . "/config/cConfig.php";
	//require_once $webConfig->C_STR_AMPLEHARVEST_CODE . "/classes/User_Manager/cUserValidation.php";
	
	$m_obj_servers = new \ampleharvest\cServers();
	$m_obj_code_config = new \ampleharvest\code\cConfig();
	//$m_obj_UserValidation = new \cUserValidation();
	
	
	$arr_Output = array();	
	$arr_Output =  $webConfig->get_Constants();
		
	$arr_Temp = $m_obj_code_config->get_Constants();
	
	$arr_Output = array_merge($arr_Output, $arr_Temp);
	
	$arr_servers = $m_obj_servers->get_Constants();
	
	$arr_Output = array_merge($arr_Output, $arr_servers);
	
	//GUID for UserName
	//$arr_Output['C_STR_USER_ID'] = $m_obj_UserValidation->get_UserID();
	
	//actual user name
	//$arr_Output['C_STR_USER_HANDLE'] = $m_obj_UserValidation->get_UserName();
	
	//First name..
	//$arr_Output['C_STR_USER_FNAME'] = $m_obj_UserValidation->get_FName();
	
	//Last name..
	//$arr_Output['C_STR_USER_LNAME'] = $m_obj_UserValidation->get_LName();
	//$arr_Output['C_STR_USER_MIDDLENAME'] = $m_obj_UserValidation->get_MiddleName();

	//$arr_Output['C_STR_USER_EMAIL'] = $m_obj_UserValidation->get_Email1();
	//$arr_Output['C_STR_USER_Phone1'] = $m_obj_UserValidation->get_Phone1();
	//$arr_Output['C_STR_USER_Phone2'] = $m_obj_UserValidation->get_Phone2();
	//$arr_Output['C_STR_USER_ASSIGNED_ORG'] = $m_obj_UserValidation->get_AssignedOrg();
	//$arr_Output['C_STR_USER_CURRENT_ORG'] = $m_obj_UserValidation->get_Org();
	//$arr_Output['C_STR_USER_CURRENT_DN'] = $m_obj_UserValidation->get_DN();
	//$arr_Output['C_STR_USER_LAST_LOGIN'] = $m_obj_UserValidation->get_LastLogin();
	
	$arr_Output['C_STR_VERSION'] = "2.1.2";
	
	// Source Data
		
	
	// HARDCODED FOR NOW
	$arr_Output['C_STR_SYSTEM_TYPE'] = 'AMPLEHARVEST'; //TODO changed from 'ALL', but this isn't used??
?>

obj_config = new Object;

obj_config = <?php print json_encode($arr_Output); ?>;

//the values should match with a directory in pages
TYPE = {
	AMPLEHARVEST : 'AMPLEHARVEST',
	OCTOBERSKY   : 'OCTOBERSKY',
	GENERALSCARE : 'GENERALSCARE',
	GROUNDEFFECT : 'GROUNDEFFECT',
	IRT : 'IRT',
};

VIEW = {
	flatfile 		: 'flatfile',
	application		: 'application'
};

Object.freeze(TYPE);